<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            background-color: aliceblue;
        }
        
        .bear {
            position: relative;
        }
        
        .bear img {
            position: absolute;
            top: 120px;
        }
        
        .bearone {
            position: absolute;
            overflow: hidden;
            background: url(media/bearb.png) no-repeat;
            z-index: 2;
            top: 550px;
            left: 0px;
            width: 200px;
            height: 100px;
            animation: bea 0.1s infinite steps(7), bmove 18s forwards;
        }
        
        @keyframes bea {
            0% {
                background-position: 0 0;
            }
            100% {
                background-position: -1400px 0;
            }
        }
        
        @keyframes bmove {
            0% {
                left: 0px;
            }
            100% {
                left: 3800px;
            }
        }
    </style>
</head>

<body>
    <div class="bear">
        <div class="bearone"></div>

        <img src="media/bg1.png" alt="">
        <img src="media/bg2.png" alt="">
    </div>
</body>

</html>